<%@ page import="cqcvc.edu.cn.entity.ServiceInfo" %>
<%@ page import="cqcvc.edu.cn.entity.ServiceType" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<jsp:include page="../index/index-header.jsp"/>
<jsp:useBean id="serviceInfo" class="cqcvc.edu.cn.entity.ServiceInfo" scope="page"/>
<jsp:useBean id="serviceType" class="cqcvc.edu.cn.entity.ServiceType" scope="page"/>
<%
    List<ServiceInfo> serviceInfos = (List<ServiceInfo>)application.getAttribute("serviceInfos");
    List<ServiceType> serviceTypes = (List<ServiceType>)application.getAttribute("serviceTypes");
    Long id=Long.parseLong(request.getParameter("id"));
    Long typeId=Long.parseLong(request.getParameter("typeId"));
    for (ServiceInfo item:serviceInfos
         ) {
        if(item.getId()==id)
        {
            serviceInfo=item;
            break;
        }
    }
    for (ServiceType item:serviceTypes
    ) {
        if(item.getId()==typeId)
        {
            serviceType=item;
            break;
        }
    }
%>
<div ng-controller="serviceInfoCtrl">
    <div class="row">
        <div class="col-xs-12" style="border-bottom: 1px solid lightgray; margin-bottom: 15px">
            <h1 class="text-center"><%=serviceInfo.getSerTitle()%> </h1>
        </div>
    </div>
    <div class="row" style="margin-bottom: 15px">
        <div class="col-xs-12">
            <img src="<%=request.getContextPath()%>/images/serShowPic?id=<%=serviceInfo.getId()%>" class="center-block"  style="width: 800px" />
        </div>
    </div>
    <div class="container">
        <dl class="dl-horizontal">
            <dt>
                服务名称：
            </dt>
            <dd>
                <%=serviceInfo.getSerTitle()%>
            </dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>
                服务类型：
            </dt>
            <dd>
                <%=serviceType.getTypeTitle()%>
            </dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>
                服务描述：
            </dt>
            <dd>
                <%=serviceInfo.getSerDetail()%>
            </dd>
        </dl>
    </div>
</div>
<jsp:include page="../index/index-foot.jsp"/>

</body>
</html>
